package entity;

import java.util.List;

public interface IOperatorDAO
{
	/**
	 * Returns an operator by ID
	 * @param oprId The ID of the operator to return
	 * @return An OperatorDTO containing the data for the given operator or null if he does'nt exist
	 * @throws DALException
	 */
	OperatorDTO getOperator(int oprId) throws DALException;

	/**
	 * Gets a List of all Operators currently in the system
	 * @return A List of OperatorDTO's
	 * @throws DALException
	 */
	List<OperatorDTO> getOperatorList() throws DALException;

	/**
	 * Adds a new operator to the system
	 * @param opr The OperatorDTO of the new operator
	 * @throws DALException
	 */
	OperatorDTO createOperator(OperatorDTO opr) throws DALException;

	/**
	 * Updates the database with the given operator DTO
	 * @param opr The operator to edit data on.
	 * @throws DALException If the operator was'nt found in the database.
	 */
	void updateOperator(OperatorDTO opr) throws DALException;
	
	/**
	 * Deletes an operator by ID
	 * @param oprId The operator to delete.
	 * @throws DALException If the operator was'nt found in the database.
	 */
	void deleteOperator(int oprId) throws DALException;
	
	/**
	 * Changes the password of the given user
	 * @param oprID The userID of whom is changing password
	 * @param passwords The current password and the new password
	 * @throws DALException If the operator was'nt found in the database.
	 */
	void changePassword(int oprId, String[] passwords) throws DALException;
}
